﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AdventureWorks.Products
{
    public partial class Search : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DynamicDataManager1.RegisterControl(GridView1);
        }

        protected void GridDataSource_Selected(object sender, LinqDataSourceStatusEventArgs e)
        {
            Response.Write(e.TotalRowCount.ToString());
        }

        protected void GridDataSource_Selecting(object sender, LinqDataSourceSelectEventArgs e)
        {
            e.Arguments.RetrieveTotalRowCount = true;
        }
    }
}
